import request from '@/util/request'

// 获取角色列表
export const getRoleListAPI = () => {
  return request({
    url: '/root/role',
    method: 'GET'
  })
}

// 添加新角色
export const addRoleAPI = (data) => {
  return request({
    url: '/root/role',
    method: 'POST',
    data
  })
}

// 更新角色权限
export const updateRolePermissionAPI = (data) => {
  return request({
    url: '/root/role',
    method: 'PUT',
    data
  })
}

// 获取所有权限列表
export const getRightListAPI = () => {
  return request({
    url: '/root/right',
    method: 'GET'
  })
}
